package com.yc.sole.erp.enums;

import com.fasterxml.jackson.annotation.JsonValue;
import com.yc.sole.common.enums.IBaseEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author yizuomin
 * @date 2024/1/27 09:51
 **/
@Getter
@AllArgsConstructor
public enum PriorityType implements IBaseEnum<String> {

    /**
     *
     */
    NORMAL("0", "普通"),
    URGENT("1", "加急"),
    ;

    @JsonValue
    private final String value;
    private final String description;

    public static String getByValue(String value) {
        for (PriorityType priorityType : PriorityType.values()) {
            if (priorityType.getValue().equals(value)) {
                return priorityType.getDescription();
            }
        }
        return null;
    }
}
